@isTest
   private class TestVisaHistoryTrigger {
      // Methods for testing
      static testMethod void CreateNewVisaHistory(){
    // Perform our data preparation.
    Account com = new Account(name='test');
    com.Master_Account_Flag__c = true;
    insert com;
            RecordType rt = [select id from RecordType where sObjectType=:'Application__c' and name =:'Employment'];  
    test.startTest();
   
   Contact Con = new Contact(FirstName='Test',LastName = 'Test',Contact_Type__c='Employee - Under Process', AccountId=Com.Id);
   insert Con;
    //Application__c testapp = new Application__c(RecordType = rt,Transaction_Number__c='test',Applicant_First_Name__c='Test',Applicant_Last_Name__c='test',  Current_Nationality__c='INDIA', Company__c=com.id,Transaction_Type_Employment__c='New',Passport_Number__c='test',Ultimus_Receipt_Number__c='test');
    //testapp.RecordTypeid =rt[0].id;
    //insert testapp;
   //List<Contact> Cont = [Select Id From Contact Where Id =: Con.Id];      
      //Visa_History__c Vhs = new Visa_History__c(Visa_Holder__c = Cont[0].Id);
      
      //By Mustafa.... 
      Visa_History__c Vhs = new Visa_History__c(Visa_Holder__c = Con.Id,Sponsor__c = com.id,isCurrent__c = true );
      insert Vhs;
      
      Visa_History__c Vhs1 = new Visa_History__c(Visa_Holder__c = Con.Id,Sponsor__c = com.id );
      insert Vhs1;
      
      Vhs1.isCurrent__c = true;
      update Vhs1;
      
        
    // Stop the test, this changes limit context back to test from trigger.
    test.stopTest();
        
   
    }

 }